<template>
  <span>count: {{ count }}</span>
  <span style="margin-left: 20px">other: {{ other }}</span>
  <button @click="count++">增加</button>
</template>

<script>
import { ref, watchEffect } from "vue";
export default {
  setup() {
    const count = ref(0);
    const other = ref("change");
    watchEffect(
      () => {
        console.log(count.value);
      }
      //   {
      //     onTrack(e) {
      //       debugger;
      //     },
      //     onTrigger(e) {
      //       debugger;
      //     },
      //   }
    );
    return {
      count,
      other,
    };
  },
};
</script>

<style>
</style>